package com.fjnldx.mes.controller.scheduling.labor;

import com.fjnldx.mes.domain.domainReq.SchedulingLaborCapitalReq;
import com.fjnldx.mes.domain.domainRes.Result;
import com.fjnldx.mes.domain.pojo.SchedulingLaborCapital;
import com.fjnldx.mes.service.scheduling.SchedulingLaborCapitalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/scheduling/labor/capital")
@Api(value = "劳资系数模块", tags = "劳资系数模块")
public class SchedulingLaborCapitalController {

    @Resource
    SchedulingLaborCapitalService service;


    @PostMapping("/addLaborCapital")
    @ApiOperation(value = "新增劳资记录（单个）", notes = "新增劳资记录（单个）")
    public Result addLaborCapital(@RequestBody SchedulingLaborCapital data) throws Exception {
        return service.addLaborCapital(data);
    }

    @PostMapping("/modifyLaborCapital")
    @ApiOperation(value = "修改劳资记录\n", notes = "修改劳资记录\n")
    public Result modifyLaborCapital(@RequestBody SchedulingLaborCapital data) throws Exception {
        return service.modifyLaborCapital(data);
    }

    @PostMapping("/deleteLaborCapital")
    @ApiOperation(value = "删除劳资记录", notes = "删除劳资记录")
    public Result deleteLaborCapital(@RequestBody String[] array) throws Exception {
        return service.deleteLaborCapital(array);
    }

    @PostMapping("/queryLaborCapital")
    @ApiOperation(value = "多条件查询劳资记录", notes = "多条件查询劳资记录")
    public Result queryLaborCapital(@RequestBody SchedulingLaborCapitalReq data) throws Exception {
        return service.queryLaborCapital(data);
    }

}
